package edu.zju.udms.dnavigator.entities.mysql;

import edu.zju.udms.dnavigator.core.entity.AttributeType;
import edu.zju.udms.dnavigator.core.entity.AttributeTypeEnum;
import edu.zju.udms.dnavigator.core.entity.Entity;
import edu.zju.udms.dnavigator.core.entity.GeneralType;
import static edu.zju.udms.dnavigator.entities.mysql.MySQLExtractor.SOURCE;
public class MySQLTable extends Entity{

	private static final long serialVersionUID = 3951753360783972620L;
	@AttributeType(AttributeTypeEnum.Key)
	public String hostName;
	
	@AttributeType(AttributeTypeEnum.Normal)
	public String databaseId;
	
	@AttributeType(AttributeTypeEnum.Key)
	public String tableType;
	
	@AttributeType(AttributeTypeEnum.Normal)
	public long rows;
	
	public MySQLTable(){}
	
	public MySQLTable(String hostName,String name,long createTime, long updateTime,
			String tableType,long rows,String databaseName,String databaseId) {
		super(name, databaseName+":"+name, GeneralType.Table, SOURCE, createTime, updateTime, null,name, null);
		this.hostName=hostName;
		this.tableType=tableType;
		this.rows=rows;
		this.databaseId=databaseId;
	}

	public String getHostName() {
		return hostName;
	}

	public void setHostName(String hostName) {
		this.hostName = hostName;
	}

	public String getDatabaseId() {
		return databaseId;
	}

	public void setDatabaseId(String databaseId) {
		this.databaseId = databaseId;
	}

	public String getTableType() {
		return tableType;
	}

	public void setTableType(String tableType) {
		this.tableType = tableType;
	}

	public long getRows() {
		return rows;
	}

	public void setRows(long rows) {
		this.rows = rows;
	}
	
}
